package com.flute.framework.spliter;

import com.flute.tools.util.StringUtil;
import com.flute.tools.word.ISpliter;

public class UniqueStringSpliter implements ISpliter {

	private static UniqueStringSpliter instance;

	private UniqueStringSpliter() {

	}

	public static synchronized UniqueStringSpliter getInstance() {
		if (instance == null) {
			instance = new UniqueStringSpliter();
		}
		
		return instance;
	}

	@Override
	public String[] split(String sentenc) {
		if (StringUtil.isNullOrEmpty(sentenc)) {
			return new String[0];
		} else {
			return sentenc.split(StringUtil.UNIQUE_STRING);
		}
	}

}
